<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/util_file/common.jspf"%>
<script type="text/javascript">
	$(document).ready(function(){
		//리스트 가기
		$("#Btnlist").click( function(){
		 $.get('/jeons/buildqna/index?bdno='+$('#db_bdno').val(),function(data){
				$("#subpage_qna").replaceWith(data);
			}); 
		});
		
		
		
		
		$(".nm").nm({
			sizes : {
				minW : 400,
				maxW : 500,
				minH : 30,
				maxH : 30
			}
		});
	});
</script>
<div id="subpage_qna">
<input type="text" value="${data.bdno}" id="db_bdno"/>
<input type="text" value="${data.passwd}" id="bdpasswd"/>
<table border="0" width="650px" height="50">
	<tr>
		<td colspan="4" bgcolor="#000000" height="1"></td>
	</tr>
	<tr>
		<th height="24" align="center">제목</th>
		<td colspan="3" width="400px">${data.title} </td>
	</tr>
	<tr>
		<td colspan="4" bgcolor="#ffffff" height="1"></td>
	</tr>
	<tr>
		<th height="24" align="center">유저아이디</th>
		<td colspan="3">${data.u_id}</td>
	</tr>
	<tr>
		<td colspan="4" bgcolor="#ffffff" height="1"></td>
	</tr>
	<tr>
		<td colspan="4" bgcolor="#ffffff" height="1"></td>
	</tr>
	<tr>
		<th colspan="4" height="4" align="center">내용</th>
	</tr>
	<tr>
		<td colspan="4" bgcolor="#ffffff" height="1"></td>
	</tr>
	<tr>
		<td colspan="4" bgcolor="#ffffff" height="1">
			${data.content}
		</td>
	</tr>
	<tr>
		<td colspan="4" bgcolor="#ffffff" height="1"></td>
	</tr>
	<tr>
		<th colspan="4" height="4" align="center">답변</th>
	</tr>
	<tr>
		<td colspan="4" bgcolor="#ffffff" height="1"></td>
	</tr>
	<tr>
		<td colspan="4" bgcolor="#ffffff" height="1">
			<c:if test="${reply.content == null}">
				답변 글이 없습니다.
			</c:if>
			<c:if test="${reply.content != null}">
				${reply.content}
			</c:if>
		</td>
	</tr>
	<tr>
	<tr>
		<td colspan="4" bgcolor="#000000" height="1"></td>
	</tr>
</table>
<div align="right">
	<a href="/jeons/buildqna/checkpasswd?qnano=${data.qnano}&board_type=modify" class="nm"><button type="button" id="BtnModify">수정</button></a>
	<a href="/jeons/buildqna/checkpasswd?qnano=${data.qnano}&board_type=delete" class="nm"><button type="button" id="BtnModify">삭제</button></a>
	<button type="button" id="Btnlist">리스트</button>
</div>	
</div>